using System;
using System.IO;
using System.Windows.Media;
using Intuipic.Interop;

namespace Intuipic.Data
{
	/// <summary>
	/// Provides a concrete implementation of <see cref="DirectoryInformationBase"/> that represents the current user's My Documents folder.
	/// </summary>
	/// <remarks>
	/// This class implements the singleton pattern to ensure that only one instance of <c>MyDocumentsInformation</c> exists.
	/// </remarks>
	public sealed class MyDocumentsInformation : DirectoryInformationBase
	{
		private static readonly ImageSource _icon = IconHelper.GetSpecialFolderIcon(Environment.SpecialFolder.MyDocuments);
		private static readonly MyDocumentsInformation _instance = new MyDocumentsInformation();

		/// <summary>
		/// Gets the one and only instance of <see cref="MyDocumentsInformation"/>.
		/// </summary>
		public static MyDocumentsInformation Instance
		{
			get
			{
				return _instance;
			}
		}

		private MyDocumentsInformation()
			: base(_icon, _icon, null, new DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)))
		{
		}
	}
}
